
default
{
	on_rez(integer start_param)
	{
		string Agentname = llKey2Name(llGetOwner());
		string Msg;
		integer Attpoint = llGetAttached();
		if (Attpoint=6) state ready; 
		//{
		//	Msg = ("I Have been Attached to wrong hand by " + Agentname);
		//	llRegionSay(0, Msg );
		//	llDetachFromAvatar();
		//}
		else if (Attpoint=0)
		{
			Msg = ("I Have been rezzed on the ground by " + Agentname);
			llRegionSay(0, Msg );
			llDie();
		}
		else
		{
				Msg = ("I Have been Attached to wrong hand by " + Agentname);
			llRegionSay(0, Msg );
			llDetachFromAvatar();
		}
	}

}
state ready
{
	state_entry()
	{
	llSay(0,"ready");	
	}
}
